import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';

//修改回显
export const qurpBatch = (id, params) => axios.get(`${SERVER.CLAIMDEALER}/rpBatch/selectById/${id}`, { params });
//结算单检索
export const getListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/getListByPage`, params);
//导出
export const getListForExport = (params) => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/getListForExport`, params, {
  responseType: 'blob'
});
  //下载中心导出
  export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
//导出
export const getAClaimStatement = (params) => axios.post(`${SERVER.CLAIMDEALER}/rpBatch/getAClaimStatement`, params, {
  responseType: 'blob'
});
//翻译
export const getPartType = (params) => axios.get(`${SERVER.CLAIMDEALER}/const/getBaseDataByType`, { params });

//索赔结算单维护首页查询
export const getClaimAccountInfo = params => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/closeAccount/getClaimAccountInfo`, params);

//索赔结算单首页导出
export const getClaimListForExport = (params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/closeAccount/getListForExport`, params,{
  responseType: 'blob'
});

//根据结算单号查询索赔单
export const getClaimInfoByNo = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/closeAccount/getClaimInfoByNo/${no}`, params);

//根据结算单号查询索赔单
export const getCloseAccountCount = (no, params) => axios.post(`${SERVER.CLAIMDEALER}/rpClaim/closeAccount/getCloseAccountCount/${no}`, params);

//根据结算单号查询索赔单各项金额
export const getCostCountByNo = (no, params) => axios.post(`${SERVER.CLAIMFAC}/rpClaim/closeAccount/queryClaimAccountCount/${no}`, params);

